package com.example.mvvmtest.test;

import com.example.mvvmtest.utils.LogUtil;

import java.util.Observable;
import java.util.Observer;

/**
 * 被观察者
 */
public class PersonObserver implements Observer {

    private String name;

    PersonObserver(String name) {
        this.name = name;
    }

    @Override
    public void update(Observable o, Object arg) {
        LogUtil.e(name + " 收到了通知 " + arg);
    }
}
